<?php
	//TO READ THE APPROPRIATE XML AS PER THE HANDSET AND FETCH ALL THE DETAILS REGARDING THE CONTENT
	//SUPPORT FOR THAT PARTICULAR HANDSET.
		
	include $_SERVER['DOCUMENT_ROOT']."/handset_support/xml_read_function.php";
	$myFile2 = $_SERVER['DOCUMENT_ROOT']."/handset_support/xml_v2/".$model.".xml";
	
	if(file_exists($myFile2))
	{
		$contents2 = file_get_contents($myFile2);//Get Content of XML File.
		$result2 = xml2array($contents2);
		
		$Hkey = $result2[handset][attributes][attr][0][value];
		$hs_model = $result2[handset][attributes][attr][1][value];
		$hs_manu = $result2[handset][attributes][attr][2][value];
		$display_name = $result2[handset][attributes][attr][3][value];
		$retail_display = $result2[handset][attributes][attr][4][value];
		
		$logo_wd = $result2[handset][support][info][0][value];
		$wp_support_id = $result2[handset][support][info][1][value];
		$poly_support_id = $result2[handset][support][info][2][value];
		$tr_support_id = $result2[handset][support][info][3][value];
		$mp_support_id = $result2[handset][support][info][4][value];
		$ani_support_id = $result2[handset][support][info][5][value];
		$cl_support_id = $result2[handset][support][info][6][value];
		$gm_support_id = $result2[handset][support][info][7][value];
		$tm_support_id = $result2[handset][support][info][8][value];
		$monotone_support_id = $result2[handset][support][info][9][value];
		$sms_poly_support_id = $result2[handset][support][info][10][value];
		$sms_true_support_id = $result2[handset][support][info][11][value];
		$sms_mp3_support_id = $result2[handset][support][info][12][value];
		$sms_im_support_id = $result2[handset][support][info][13][value];
		$vi_support_id = $result2[handset][support][info][14][value];
		$fla_support_id = $result2[handset][support][info][15][value];
		$vstream_support_id = $result2[handset][support][info][16][value];
		$op_logo_support_id = $result2[handset][support][info][17][value];
		$pic_msg_support_id = $result2[handset][support][info][18][value];
		$sms_tone_support_id = $result2[handset][support][info][19][value];
		$sp_charge_support_id = $result2[handset][support][info][20][value];
		$subs_charge_support_id = $result2[handset][support][info][21][value];
		$drm_support_id = $result2[handset][support][info][22][value];
		$rbt_support_id = $result2[handset][support][info][23][value];
		$offline_true_support_id = $result2[handset][support][info][24][value];
		$offline_mp3_support_id = $result2[handset][support][info][25][value];
		$offline_video_support_id = $result2[handset][support][info][26][value];
		$songs_audio_support_id = $result2[handset][support][info][27][value];
		$browser_support_id = $result2[handset][support][info][28][value];
		$res_support = $result2[handset][support][info][29][value];
		$songs_video_support_id = $result2[handset][support][info][30][value];
		$dialnsong_support_id = $result2[handset][support][info][31][value];
		$vf_combi_support_id = $result2[handset][support][info][32][value];
		$vcal_support_id = $result2[handset][support][info][33][value];
		$text_support_id = $result2[handset][support][info][34][value];
		
		$result2 = array();
		unset($contents2);
	}
	else
	{
		$Hkey 			= 0;
		$hs_model 		= 'unknown model';
		$hs_manu 		= 'unknown manu';
		$display_name 	= '';
		$retail_display = '';
		
		$logo_wd 					= 166;
		$wp_support_id 				= 67;					//default wallpaper 176x176
		$poly_support_id 			= 30;					//default polytone 4 channel midi
		$tr_support_id 				= 0;
		$mp_support_id 				= 0;
		$ani_support_id 			= 15;					//default animation 176x176
		$cl_support_id 				= 0;
		$gm_support_id 				= 0;
		$tm_support_id 				= 0;
		$monotone_support_id 		= 0;
		$sms_poly_support_id 		= 78;				//default sms polytone 4 channel midi
		$sms_true_support_id 		= 0;
		$sms_mp3_support_id 		= 0;
		$sms_im_support_id 			= 0;
		$vi_support_id 				= 0;
		$fla_support_id 			= 271;				// default FLA group id for < 1 MB
		$vstream_support_id 		= 0;
		$op_logo_support_id 		= 0;
		$pic_msg_support_id 		= 0;
		$sms_tone_support_id 		= 0;
		$sp_charge_support_id 		= 0;
		$subs_charge_support_id 	= 0;
		$drm_support_id 			= 0;
		$rbt_support_id 			= 0;
		$offline_true_support_id	= 0;
		$offline_mp3_support_id 	= 0;
		$offline_video_support_id 	= 0;
		$songs_audio_support_id 	= 0;
		$browser_support_id 		= 171;				//default wml support
		$res_support 				= 0;
		$songs_video_support_id 	= 0;
		$dialnsong_support_id 		= 0;
		$vf_combi_support_id 		= 0;
		$vcal_support_id 			= 0;
		$text_support_id 			= 0;
	}

	$lyrics_support_id	=1;
?>